package com.gitee.simons.oauth.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author simons
 * @since 2020-07-07
 */
@RestController
@RequestMapping("/sysUser")
@Api(tags = {"用户信息"})
public class SysUserController {

    @PostMapping("/getCurrentUser")
    @ApiOperation("获取用户信息")
    public Object getCurrentUser(@RequestBody Authentication authentication) {
        return authentication.getPrincipal();
    }

}

